Action hook 'rest_insert_{$this->taxonomy}'

in WP Core File wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php at line 559

Description

Fires after a single term is created or updated via the REST API. The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug. Possible hook names include: - `rest_insert_category` - `rest_insert_post_tag`

Occurrences

Filename Line Number
wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php 559
wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php 679
wp-includes/rest-api/endpoints/class-wp-rest-menus-controller.php 240
wp-includes/rest-api/endpoints/class-wp-rest-menus-controller.php 324

Parameters

Type Name Description
WP_Term $term Inserted or updated term object.
WP_REST_Request $request Request object.
bool $creating True when creating a term, false when updating.

PHP Doc

/**
		 * Fires after a single term is created or updated via the REST API.
		 *
		 * The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug.
		 *
		 * Possible hook names include:
		 *
		 *  - `rest_insert_category`
		 *  - `rest_insert_post_tag`
		 *
		 * @since 4.7.0
		 *
		 * @param WP_Term         $term     Inserted or updated term object.
		 * @param WP_REST_Request $request  Request object.
		 * @param bool            $creating True when creating a term, false when updating.
		 */